package com.myStoreorderProvider.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import entity.*;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

/**
 * @author oahner
 * @create 2022-04-16 13:54
 */
@Mapper
public interface MyStoreorderMapper extends BaseMapper<Outorder> {


    /**
     * 获取我的门店订单列表
     * @param outorder
     * @return
     */
    public List<Outorder> getMyOutorder(Outorder outorder);

    /**
     * 获取我的门店订单详情
     * @param outorderinfo
     * @return
     */
    public List<Outorderinfo> getMyOutorderInfo(Outorderinfo outorderinfo);

    /**
     * 签收我的订单
     * @param outorder
     * @return
     */
    public int updateMyOutorder(Outorder outorder);



    /**
     * 获取商品分类
     * @return
     */
    public List<Map<String,Object>> selProductCategory();

    /**
     * 根据分类获取商品
     *  @param product
     * @return
     */
    public List<Product> selProductByCategory(Product product);

    /**
     * 添加订单
     *  @param outorder
     * @return
     */
    public int insertOutorder(Outorder outorder);

    /**
     * 添加订单详情
     *   @param outorderinfo
     * @return
     */
    public int insertOutorderinfo(List<Outorderinfo> outorderinfo);


    /**
     * 添加退货订单
     *   @param returnOrder
     * @return
     */
    public int insertReturnOrder(Return returnOrder);

    /**
     * 修改订单详情状态（退货）
     *   @param outorderinfo
     * @return
     */
    public int updateOutorderinfoStatus(Outorderinfo outorderinfo);

    /**
     * 添加退货订单
     *   @param storebill
     * @return
     */
    public int insertStoreBill(Storebill storebill);

    /**
     * 查询商品限购规格
     *  @param id
     * @return
     */
    public Product selProductMaxAndMin(String id);

    /**
     * 查询商品限购规格
     *  @param stock
     * @return
     */
    public Integer selProductStock(Stock stock);

}
